<?php

	require_once( "common.php" );

	class UserController extends CommonController
	{
		
		public function authenticate( $username, $password )
		{
			if ( $user = $this->master->executePlugin( "user", "authenticate", $username, $password ) )
			{
				$_SESSION["user"] = $user;
				
				return true;
			}
			
			return false;
		}
		
		public function logout()
		{
			unset( $_SESSION["user"] );
			
			return true;
		}
	}

?>
